SPyChart - Example notebook


Note: This tool requires a dataset with a minimum of 15 data points in order to function. Additionally, an additional column 'n' will need to be included (representing sample size) if using the following charts: - p-chart - np-chart (n must be fixed) - u-chart

Basic SPC Analysis

In this example, we will create a simple SPC chart. For this example, we will ignore any process changes and plot the SPC chart with only a single calculation for the control lines (i.e., the control lines will take all data into account).

$XmR - chart$

Re-calculating control lines after each process change.

If you know a process change is occuring, and want to re-calculate the control lines to reflect the change, we can include the change_dates argument (must be a list of date(s)) in the initialisation, shown below.

$XmR -chart$

Calculating control lines on baseline data

Now, suppose we didn't know a whether a change in the system had an impact on our measured process. Rather than using the change_dates parameter, we can use the baseline_date parameter, to calculate control lines only on data before this specified date. This will give an indication of the impact to the measured process following a change to the system.

$Individual-chart$

Non-daily data

Our examples have used daily data, but data of any frequency can be used.

$c-chart$

Other SPC types

Some SPC charts take averages of samples of data, meaning each day (or hour, week, etc...), has n samples.

$\bar{X}R - chart$

Generally a sample size $>=5$ qualifies the use of the $\bar{X}S - chart$ (standard deviation rather than range)

$\bar{X}S - chart$

With a p-charts, u-charts and np-charts, you'll need to feed in an additional 'n' column, represnting the sample size, in order to calulate proportions. Since we need to know n at each position, the baseline approach would no longer be suitable.

$p - chart$

$np - chart$

$u - chart$

$u - chart$ (re-calculating control lines)